<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-flood-add" th:object="${flood}">
        <div class="form-group">
            <label class="col-sm-3 control-label ">数据编号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="id" id="id">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label ">数据类型：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="type" id="type" >
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label ">地域编号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="rid" id="rid"  >
            </div>
        </div>


        <div class="form-group">
            <label class="col-sm-3 control-label">地域名称：</label>
            <div class="col-sm-8">
                <select id="rname" name="rname" class="form-control m-b">
                    <option>=请选择=</option>
                    <option th:each="list:${flood}" th:value="${list.rname}" th:text="${list.rname}">
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">数据大小：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="data" id="data">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">采集日期时间：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="time" id="time" >
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "iot/flood";

    $("#form-flood-add").validate({
        rules:{
            xxxx:{
                required:true,
            },
        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-flood-add').serialize());
        }
    }
</script>
</body>
</html>
